module MC.View {
    export class Pwd{
        public constructor() {
			 this.init();
        }
        private init(){
            $('.huoquyanzhengma').on('click',()=>{
                MC.apiD('huoquyanzhengma');
            });
            $('.tijiao').on('click',()=>{
                this.tijiao();
            });
        }
        private tijiao(){
            let yzm=$('#yzm').val();
            let pwd1=$('#pwd1').val();
            let pwd2=$('#pwd2').val();
            if(yzm==''){
                MC.msg.alert('验证码必须输入');return;
            }
            if(pwd1==''){
                MC.msg.alert('密码必须输入');return;
            }
            if(pwd1!=pwd2){
                MC.msg.alert('两次密码输入不一致');return;
            }
            MC.apiD('ChangePassword',{
                yzm:yzm,
                pass:pwd1
            },()=>{
                MC.msg.alert('密码修改成功');
            });
        }
    }
}